package com.gdut.huayan.service.job;

import com.gdut.huayan.service.WechatService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class WechatAccessTokenJob extends QuartzJobBean {

    @Autowired
    private WechatService wechatService;

    @Override
    protected void executeInternal(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        wechatService.getAccessToken();
    }

}

